<script src="jquery-1.8.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
  
  $(document).ready(function(){

    // By Class
    $('#clickId').click(function(){    
      var txt1Val = $('#txt1').val();// get Value
      
      $('#txt1').val('');// set Value
      $('#txt2').val(txt1Val);// set Value      
    });
    
  });
  
</script>

<p>
  <a href="#" id="clickId">click me</a>
</p>

<input id="txt1" /><br>
<input id="txt2" /><br>
